<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>BrainTrain: header/CelShading.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">BrainTrain
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_cel_shading_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">CelShading.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_cel_shading_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;osgFX/Export&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;osgFX/Effect&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;osg/Material&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;osg/LineWidth&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">namespace </span>brtr {</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html">   18</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classbrtr_1_1_cel_shading.html">CelShading</a> : <span class="keyword">public</span> osgFX::Effect {</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="classbrtr_1_1_cel_shading.html#ae497a14c2c379b608643d8f39d156b52">CelShading</a>(<span class="keywordtype">bool</span> secondPass = <span class="keyword">true</span>, std::string vertSource = <span class="stringliteral">&quot;celShader.vert&quot;</span>);</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <a class="code" href="classbrtr_1_1_cel_shading.html#ae497a14c2c379b608643d8f39d156b52">CelShading</a>(<span class="keyword">const</span> <a class="code" href="classbrtr_1_1_cel_shading.html">CelShading</a>&amp; copy, <span class="keyword">const</span> osg::CopyOp&amp; copyop = osg::CopyOp::SHALLOW_COPY);</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <a class="code" href="classbrtr_1_1_cel_shading.html#a02ab424cf06935b9560b5c39d733d02c">META_Effect</a>(</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            null,</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;            <a class="code" href="classbrtr_1_1_cel_shading.html">CelShading</a>,</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            <span class="stringliteral">&quot;CelShading&quot;</span>,</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            <span class="stringliteral">&quot;This effect implements a technique called &#39;Cel-Shading&#39; to produce a &quot;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            <span class="stringliteral">&quot;cartoon-style (non photorealistic) rendering. Two passes are required: &quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            <span class="stringliteral">&quot;the first one draws solid surfaces, the second one draws the outlines. &quot;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <span class="stringliteral">&quot;Vertices Shader, Toon Texture pass can be customize upon creating.&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;             ,</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            <span class="stringliteral">&quot;Marco Jez; OGLSL port by Mike Weiblen, adaptions by Gleb Ostrowski &quot;</span>);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html#ab6148e389081719d56d2971cc8924841">   43</a></span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classbrtr_1_1_cel_shading.html#ab6148e389081719d56d2971cc8924841">~CelShading</a>() {}</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classbrtr_1_1_cel_shading.html#a28212bb66f29ff8cf1169625b598b93b">define_techniques</a>();</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html#ae67a870d7a985694fb0d3290f0163f84">   48</a></span>&#160;        osg::ref_ptr&lt;osg::Material&gt; <a class="code" href="classbrtr_1_1_cel_shading.html#ae67a870d7a985694fb0d3290f0163f84">_material</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html#ae1e0a4de3ca638da0fe0a3b3aa018f07">   49</a></span>&#160;        osg::ref_ptr&lt;osg::LineWidth&gt; <a class="code" href="classbrtr_1_1_cel_shading.html#ae1e0a4de3ca638da0fe0a3b3aa018f07">_lineWidth</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html#a15226eda13f5a3deaee3260414f664bf">   50</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classbrtr_1_1_cel_shading.html#a15226eda13f5a3deaee3260414f664bf">_secondPass</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classbrtr_1_1_cel_shading.html#a6c9ea02f1a90b0ba711394c4ff716081">   51</a></span>&#160;        std::string <a class="code" href="classbrtr_1_1_cel_shading.html#a6c9ea02f1a90b0ba711394c4ff716081">_vertSource</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    };</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_a02ab424cf06935b9560b5c39d733d02c"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#a02ab424cf06935b9560b5c39d733d02c">brtr::CelShading::META_Effect</a></div><div class="ttdeci">META_Effect(null, CelShading,&quot;CelShading&quot;,&quot;This effect implements a technique called 'Cel-Shading' to produce a &quot;&quot;cartoon-style (non photorealistic) rendering. Two passes are required: &quot;&quot;the first one draws solid surfaces, the second one draws the outlines. &quot;&quot;Vertices Shader, Toon Texture pass can be customize upon creating.&quot;,&quot;Marco Jez; OGLSL port by Mike Weiblen, adaptions by Gleb Ostrowski &quot;)</div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html">brtr::CelShading</a></div><div class="ttdoc">CelSading Effect, every child of this node will get the effect. </div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00018">CelShading.h:18</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_ae67a870d7a985694fb0d3290f0163f84"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#ae67a870d7a985694fb0d3290f0163f84">brtr::CelShading::_material</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::Material &gt; _material</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00048">CelShading.h:48</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_ab6148e389081719d56d2971cc8924841"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#ab6148e389081719d56d2971cc8924841">brtr::CelShading::~CelShading</a></div><div class="ttdeci">virtual ~CelShading()</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00043">CelShading.h:43</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_a15226eda13f5a3deaee3260414f664bf"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#a15226eda13f5a3deaee3260414f664bf">brtr::CelShading::_secondPass</a></div><div class="ttdeci">bool _secondPass</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00050">CelShading.h:50</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_a28212bb66f29ff8cf1169625b598b93b"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#a28212bb66f29ff8cf1169625b598b93b">brtr::CelShading::define_techniques</a></div><div class="ttdeci">bool define_techniques()</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8cpp_source.html#l00110">CelShading.cpp:110</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_ae1e0a4de3ca638da0fe0a3b3aa018f07"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#ae1e0a4de3ca638da0fe0a3b3aa018f07">brtr::CelShading::_lineWidth</a></div><div class="ttdeci">osg::ref_ptr&lt; osg::LineWidth &gt; _lineWidth</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00049">CelShading.h:49</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_ae497a14c2c379b608643d8f39d156b52"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#ae497a14c2c379b608643d8f39d156b52">brtr::CelShading::CelShading</a></div><div class="ttdeci">CelShading(bool secondPass=true, std::string vertSource=&quot;celShader.vert&quot;)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8cpp_source.html#l00097">CelShading.cpp:97</a></div></div>
<div class="ttc" id="classbrtr_1_1_cel_shading_html_a6c9ea02f1a90b0ba711394c4ff716081"><div class="ttname"><a href="classbrtr_1_1_cel_shading.html#a6c9ea02f1a90b0ba711394c4ff716081">brtr::CelShading::_vertSource</a></div><div class="ttdeci">std::string _vertSource</div><div class="ttdef"><b>Definition:</b> <a href="_cel_shading_8h_source.html#l00051">CelShading.h:51</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_1ec98ce50fa6ec55b40b8ffb1df38c3c.html">header</a></li><li class="navelem"><a class="el" href="_cel_shading_8h.html">CelShading.h</a></li>
    <li class="footer">Generated on Thu Jul 17 2014 01:40:24 for BrainTrain by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
